#ifndef _VECTOR2_H__
#define _VECTOR2_H__

#include<d3dx10.h>

class Vector2 : public D3DXVECTOR2
{
public:
	inline float Length() { return D3DXVec2Length(this); }
	inline Vector2* Normalize() { return static_cast<Vector2 *>(D3DXVec2Normalize(this, this)); }
	inline float Dot(const Vector2 &b) { return D3DXVec2Dot(this, &b); }
	inline void operator = (const POINT &pt);
	static Vector2 Zero() {return Vector2(0.0f, 0.0f);}
	
	Vector2(D3DXVECTOR2 &v2) { x = v2.x; y = v2.y; }
	Vector2() : D3DXVECTOR2() { }
	Vector2(const float _x, const float _y) { x = _x; y = _y; }
	Vector2(POINT pt) { x = pt.x; y = pt.y; }
};

inline void Vector2::operator = (const POINT &pt) { x = pt.x; y = pt.y;}

#endif